"""
FIVEDASH(TM) -- General Purpose Accounting Software
Copyright (C) 2008  Obol Software Pty Ltd

This program is free software: you can redistribute it and/or modify
it. For terms and conditions, see fivedash/license/license.txt

"""

import app_sql
import start_sql

class ActionExistError(Exception):
	pass

def register_action( name, action ):
	if action_map.has_key( name ):
		raise ActionExistError,'ActionExistError %s' % name
	else:
		action_map[name]=action	

action_map = {}  

for action_name in app_sql.operations_action_map.keys():
	register_action(action_name,app_sql.operations_action_map[action_name])

for action_name in app_sql.crm_action_map.keys():
	register_action(action_name,app_sql.crm_action_map[action_name])

for action_name in app_sql.admin_action_map.keys():
	register_action(action_name,app_sql.admin_action_map[action_name])

for action_name in app_sql.finance_action_map.keys():
	register_action(action_name,app_sql.finance_action_map[action_name])

for action_name in app_sql.tax_action_map.keys():
	register_action(action_name,app_sql.tax_action_map[action_name])		

for action_name in app_sql.app_admin_action_map.keys():
	register_action(action_name,app_sql.app_admin_action_map[action_name])		

for action_name in app_sql.report_action_map.keys():
	register_action(action_name,app_sql.report_action_map[action_name])

for action_name in start_sql.start_sql_map.keys():
	register_action(action_name,start_sql.start_sql_map[action_name])
